package com.zdj.websocket.controller.v4;

import com.zdj.websocket.service.WebSocketService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Controller;

/**
 * @author zhangdj
 */
@Controller
public class ServerInfoController {

    @Autowired
    private WebSocketService webSocketService;


    @Scheduled(fixedRate = 3000)
    public void sendServerInfo() {
        webSocketService.sendServerInfo("/topic/server_info");
    }
}
